{extend name="adminblue/base" /}
{block name="resources"/}
<script src="ADMIN_JS/highcharts.js"></script>
<script src="ADMIN_JS/exporting.js"></script>
<style  type="text/css">
.w210{width:210px;}
.h30 {height: 30px !important;}
.top-alert{border: 1px solid #FBEED5;}
.w450 {width: 450px!important;}
.mr50 {margin-right: 50px !important;}
.count-box li{font-size: 12px;}
</style>
{/block}
{block name="main"}
<div class="count-box">

	<div class="main-content" id="mainContent">
		<div class="alert mt10 top-alert">
			<ul class="mt5">
				<li>1、符合以下任何一种条件的订单即为有效订单：1）采用在线支付方式支付并且已付款；2）采用货到付款方式支付并且交易已完成</li>
				<li>2、以下关于订单和订单商品近30天统计数据的依据为：从昨天开始最近30天的有效订单</li>
			</ul>
		</div>
		<div class="alert alert-info mt10" style="clear:both;">
			<ul class="mt5">
				<li>
					<span class="w210 fl h30" style="display:block;">
						<i title="店铺从昨天开始最近30天有效订单的总金额" class="tip icon-question-sign"></i>
						近30天下单金额：<strong>{$account.order_money}元</strong>
					</span>
					<span class="w210 fl h30" style="display:block;">
						<i title="店铺从昨天开始最近30天有效订单的会员总数" class="tip icon-question-sign"></i>
						近30天下单会员数：<strong>{$account.order_user_num}</strong>
					</span>
					<span class="w210 fl h30" style="display:block;">
						<i title="店铺从昨天开始最近30天有效订单的总订单数" class="tip icon-question-sign"></i>
						近30天下单量：<strong>{$account.order_num}</strong>
					</span>
					<span class="w210 fl h30" style="display:block;">
						<i title="店铺从昨天开始最近30天有效订单的总商品数量" class="tip icon-question-sign"></i>
						近30天下单商品数：<strong>{$account.order_goods_num}</strong>
					</span>
				</li>
				<li>
					<span class="w210 fl h30" style="display:block;">
						<i title="店铺从昨天开始最近30天有效订单的平均每个订单的交易金额" class="tip icon-question-sign"></i>
						平均客单价：<strong>{$account.user_money_average}元</strong>
					</span>
					<span class="w210 fl h30" style="display:block;">
						<i title="店铺从昨天开始最近30天有效订单商品的平均每个商品的成交价格" class="tip icon-question-sign"></i>
						平均价格：<strong>{$account.goods_money_average}元</strong>
					</span>
				</li>
			</ul>
			<div style="clear:both;"></div>
		</div>

		<div id="container" data-highcharts-chart="0">
			<div class="highcharts-container" id="highcharts-0" style="position: relative; overflow: hidden; width: 959px; height: 400px; text-align: left; line-height: normal; z-index: 0; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-family: &amp; quot; Lucida Grande&amp;quot; , &amp; quot; Lucida Sans Unicode&amp;quot; , Verdana , Arial, Helvetica, sans-serif; font-size: 12px;"></div>
		</div>

		<div class="w450 fl mr50" style="display: none;">
			<div class="alert alert-info" style="margin-bottom:0px;"><strong>建议推广商品</strong>
				&nbsp;<i title="统计店铺从昨天开始7日内热销商品前30名，建议推广以下商品，提升推广回报率" class="tip icon-question-sign"></i>
			</div>
			<table class="ncsc-default-table">
				<thead>
					<tr class="sortbar-array">
						<th class="align-center">序号</th>
						<th class="align-center">商品名称</th>
						<th class="align-center">销量</th>
					</tr>
				</thead>
				<tbody id="datatable">
					<tr>
						<td colspan="20" class="norecord"><div class="warning-option"><i class="icon-warning-sign"></i><span>暂无符合条件的数据记录</span></div></td>
					</tr>
				</tbody>
			</table>
		</div>
		
		<div class="w450 fl" style="display: none;">
			<div class="alert alert-info" style="margin-bottom:0px;"><strong>同行热卖</strong>
				&nbsp;<i title="拥有相同经营类目同行店铺热销商品推荐，了解行业热卖便于调整商品结构" class="tip icon-question-sign"></i>
			</div>
			<table class="ncsc-default-table">
				<thead>
					<tr class="sortbar-array">
						<th class="align-center">序号</th>
						<th class="align-center">商品名称</th>
						<th class="align-center">销量</th>
					</tr>
				</thead>
				<tbody id="datatable">
					<tr>
						<td colspan="20" class="norecord"><div class="warning-option"><i class="icon-warning-sign"></i><span>暂无符合条件的数据记录</span></div></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="h30 cb">&nbsp;</div>
	</div>
</div>
<script>
var time = [1+"日",2+"日",3+"日",4+"日",5+"日",6+"日",7+"日",8+"日",9+"日",10+"日",11+"日",12+"日",13+"日",14+"日",15+"日",16+"日",17+"日",18+"日",19+"日",20+"日",21+"日",22+"日",23+"日",24+"日",25+"日",26+"日",27+"日",28+"日",29+"日",30+"日"];
var data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
$(function(){
	Chart = new Highcharts.Chart("container",{

		"xAxis" : {
			"categories" : time
		},
		"legend" : {
			"enabled" : false
		},
		"series" : [ {
			"name" : "下单量",
			"data" : data
		} ],
		"title" : {
			"text" : "<b>下单量<\/b>",
			"x" : -20
		},
		"chart" : {
			"type" : "line"
		},
		"colors" : [ "#058DC7", "#ED561B", "#8bbc21",
				"#0d233a" ],
		"credits" : {
			"enabled" : false
		},
		"exporting" : {
			"enabled" : false
		},
		"yAxis" : {
			"title" : {
				"text" : "下单量"
			}
		}
	});
	$.ajax({
		type : "post",
		url : "{:__URL('ADMIN_MAIN/account/getshopsalenumcount')}",	
		success : function(data) {
			Chart.update({
				xAxis : {
					categories : data[0]
				},
				series : [ {
					name : "下单量",
					data : data[1]
				}]
			});
		}
	})
});
</script>
{/block}